package cn.bone.dream;


import java.util.*;

public class DreamAsphyxia {

    public static void main(String... args){
        go();
    }


    public static void go(){
        int[] red = new int[33];
        int[] blue = new int[16];

        for(int i=0;i<33;i++){
            red[i] = i+1;
        }
        for(int i=0;i<16;i++){
            blue[i] = i+1;
        }

        Random random = new Random();
        //red
        Set<Integer> redSet = new HashSet<>();
        while(true){
            int index = random.nextInt(red.length);
            redSet.add(red[index]);
            if(redSet.size()==6){
                break;
            }
        }

        List<Integer> list = new ArrayList<>(redSet);
        list.sort((o1,o2)->{
            return o1.compareTo(o2);
        });

        //blue
        Set<Integer> blueSet = new HashSet<>();
        while(true){
            int index = random.nextInt(blue.length);
            blueSet.add(blue[index]);
            if(blueSet.size()==1){
                break;
            }
        }
        String redDream = dreamStr(list);
        String blueDream = dreamStr(new ArrayList<>(blueSet));
        System.out.println("\033[1;31m" + redDream + "\033[1;30m - " + "\033[1;34m" + blueDream);
    }

    public static String dreamStr(List<Integer> list){
        StringBuilder builder = new StringBuilder();
        for(int i=0;i<list.size();i++){
            if(i==0){
                builder.append("[");
            }else{
                builder.append(", ");
            }
            if(list.get(i)<10){
                builder.append("0");
            }
            builder.append(list.get(i));
            if(i==list.size()-1){
                builder.append("]");
            }
        }
        return builder.toString();
    }
}
